package leecode

type CQueue struct {
	book []int
}

func ConstructorLCR() CQueue {
	return CQueue{book: make([]int, 0)}
}

func (this *CQueue) AppendTail(value int) {
	//还书
	this.book = append(this.book, value)
}

func (this *CQueue) DeleteHead() int {
	//借书 先借的书是最后换的书
	if len(this.book) == 0 {
		return -1
	}
	result := this.book[0]
	this.book = this.book[1:]
	return result
}
